import axios from "./axios"

export default {
    // 添加用户
    addUser: (data) => {
        return axios({
            method: "post",
            url: "user/addOrUpdate",
            data
        })
    },
    // 用户列表
    getUserList: (data) => {
        return axios({
            method: "get",
            url: "user/getPage",
            params: {
                "pageNo": data.pageNo,
                "pageSize": data.pageSize,
                "searchTxt": data.searchTxt
            }
        })
    },
    // 删除用户
    deleteUser: (id) => {
        return axios({
            method: "delete",
            url: "user/delete/" + id,
        })
    },
    //********************************************************************* */

    // 添加消息
    addMessage: (data) => {
        return axios({
            method: "post",
            url: "message/addOrUpdate",
            data
        })
    },
    // 消息列表
    getMessageList: (data) => {
        return axios({
            method: "get",
            url: "message/getPage",
            params: {
                "pageNo": data.pageNo,
                "pageSize": data.pageSize,
                "searchTxt": data.searchTxt
            }
        })
    },
    // 删除消息
    deleteMessage: (id) => {
        return axios({
            method: "delete",
            url: "message/delete/" + id,
        })
    },
    //********************************************************************* */

    // 添加部门
    addOrg: (data) => {
        return axios({
            method: "post",
            url: "org/addOrUpdate",
            data
        })
    },
    // 部门列表
    getorgList: (data) => {
        return axios({
            method: "post",
            url: "org/list",
            data
        })
    },
    // 删除部门
    deleteOrg: (id) => {
        return axios({
            method: "delete",
            url: "org/delete/" + id,
        })
    },
}